package com.binance.assetservice.data.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.binance.assetservice.data.models.UserAssetItem;
import com.binance.master.old.config.OldDB;


@OldDB
public interface UserAssetItemMapper {

    List<UserAssetItem> getUserAsset(@Param("start") Integer start, @Param("rows") Integer rows,
            @Param("uids") List<String> uids, @Param("asset") String asset);

    long getUserAssetCount(@Param("uids") List<String> uids, @Param("asset") String asset);

    UserAssetItem getUserAssetByUidAndAsset(@Param("uid") String uid, @Param("asset") String asset);

    int updateUserAsset(UserAssetItem userAsset);

    int updateWithdrawingFail(Map<String, Object> params);

    int updateUserAssetFreeze(UserAssetItem userAsssetItem);

    int insertOrUpdateUserAsset(UserAssetItem userAsssetItem);

    // ipoable 是增量
    void addCommission(UserAssetItem userAsssetItem);
    
    public int selectNegativeUserAsset(@Param("userId") String userId);

}
